<template>
	<view class="container">
		<es-cell-list title="基础用法">
			<es-cell-item title="标题展示" :show-arrow="false"></es-cell-item>
		</es-cell-list>
		<es-cell-list margin-top="20rpx">
			<es-cell-item title="页面跳转" @click="toPage('/pages/basic/cell')"></es-cell-item>
		</es-cell-list>
		
		<es-cell-list title="输入框">
			<es-cell-item title="昵称" type="input" placeholder="请输入昵称" ></es-cell-item>
			<es-cell-item title="有效期" type="input" placeholder="请输入有效期" :value="5"  unit="天"></es-cell-item>
			<es-cell-item title="价格" type="input" placeholder="请输入价格" unit="元"></es-cell-item>
		</es-cell-list>
		<es-cell-list title="开关">
			<es-cell-item title="是否启用" type="switch" ></es-cell-item>
			<es-cell-item title="默认状态" type="switch" checked></es-cell-item>
		</es-cell-list>
		<es-cell-list title="图片">
			<es-cell-item title="封面图" type="image" placeholder="请上传封面图"></es-cell-item>
			<es-cell-item title="LOGO" type="image" placeholder="请上传LOGO" value="/static/images/logo.png"></es-cell-item>
		</es-cell-list>
	</view>
</template>

<script>
	export default {
		methods:{
			toPage(url){
				uni.showToast({
					icon:"none",
					title:"跳转到新页面"
				})
			}
		},
		onShareTimeline() {
			return {
				title: '组件-单元格',
				imageUrl: "/static/images/logo.png",
			}
		},
		onShareAppMessage() {
			return {
					title: '组件-单元格',
				imageUrl: "/static/images/logo.png",
			}
		},
	}
</script>

<style>
</style>